
var Validate = Class.create();
Validate.prototype = {
 initialize: function (){
 },
 failed: function(domain, field, message){
    var element = domain + '_' + field;
    var validation_element = field + '_validation_msg';
  
    Element.update($(validation_element), message);
    Element.show($(validation_element));
    Element.addClassName($(element),'hasError')
 },
 succeed: function(domain, field){
    var element = domain + '_' + field;
    var validation_element = field + '_validation_msg';
    Element.update($(validation_element), '');
    Element.hide($(validation_element));
    Element.removeClassName($(element),'hasError')
 }
}